package service.impl;

import pojo.Card;
import service.CardService;

import java.util.List;
import java.util.logging.Logger;

public class CardServiceImpl implements CardService {
    private Logger logger = Logger.getLogger(CardServiceImpl.class);
    @Override
    public List<Card> getCardsList() {
        SqlSession sqlSession = null;
        List<Card> cardList = new ArrayList<>();
        try {
            sqlSession = MyBatisUtil.createSqlSession();
            cardList = sqlSession.getMapper(CardMapper.class).getCardsList();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            MyBatisUtil.closeSqlSession(sqlSession);
        }
        return cardList;
    }

    @Override
    public int getCardByIdNumber(String idNumber) {
        return 0;
    }

    @Override
    public int addCard(Card card) {
        return 0;
    }

    @Override
    public int modify(Integer status, Integer id) {
        return 0;
    }

    @Override
    public int delCard(Integer id) {
        return 0;
    }
}
